<template>
  <!-- 头部：LOGO 搜索 打开APP -->
  <div class="homepage-header">
    <div class="xmly-header">
      <span class="logo" @click="toHome">喜马拉雅</span>

      <van-search
        class="search"
        v-model="searchValue"
        placeholder="搜索"
        shape="round"
      />

      <van-button class="openapp" round type="info" color="#f86442" plain
        >打开APP
      </van-button>
    </div>
  </div>
</template>

<script>
  export default {
    name: "XmlyHeader",
    data() {
      return {
        searchValue: "",
      };
    },
    methods: {
      toHome() {
        this.$router.push({
          name: "tuijian",
        });
      },
    },
  };
</script>

<style>
  .homepage-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .xmly-header {
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
  }

  .search {
    width: 100%;
  }

  .logo {
    padding: 0px 10px 0px 0px;
    font-size: 16px;
    font-weight: 550;
    color: #e64123;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .openapp {
    margin: 0px 0px 0px 10px;
    padding: 8px 10px;
    width: 90px;
    height: 34px;
    font-size: 12px;
  }
</style>
